package com.tvserials.repository;

import com.tvserials.notification.dto.Episode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
public interface EpisodeRepository extends JpaRepository<Episode, Integer> {

    @Query("SELECT max(e.releaseDate) FROM Episode e")
    Date getLastSyncDate();
}
